<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>方法优化</title>
    <script type="text/javascript">

        // function heihei(a, b, c) {
        //     a = a || 80;
        //     b = b || 99;
        //     c = c || 25;
        //
        //     console.log("heihei方法：a:" + a + " b:" + b + " c:" + c);
        // }
        //
        // heihei();
        // heihei(10);
        // heihei(10, 20);
        // heihei(10, 20, 30);
        // heihei(10, 20, 30, 40);


        // function heihei(a = 80, b = 99, c = 25) {
        //
        //     console.log("heihei方法：a:" + a + " b:" + b + " c:" + c);
        // }
        //
        // heihei();
        // heihei(10);
        // heihei(10, 20);
        // heihei(10, 20, 30);
        // heihei(10, 20, 30, 40);


        let abc = function (num) {
            return num + 10;
        }

        let cdef = num => num + 10;

        let result = cdef(50);

        console.log(result);


        let mp = (a,b,c,d) => {a+b+c+d};

        let result1 = mp(1,2,3,4);

        console.log(result1);


    </script>
</head>
<body>

</body>
</html>